<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>

        function Person(name, age) {
            this.name = name;
            this.age = age;
            this.fn = function () {
                console.log(1);
            }
        }
        Person.prototype.fn = function () {
            console.log(2);
        }

        Person.prototype.say = function () {
            console.log('say');
        }



        const p1 = new Person('cc', 20);


        // 函数也是一个对象   也有__proto__这个属性

        console.log(Person.__proto__ === Function.prototype) ;
        console.log(Function.prototype.__proto__ === Object.prototype);
        console.log(Object.prototype.__proto__ === null);



        // const f = new Function()


    </script>

</body>

</html>